<form dForm>
  <d-form-item>
    <d-search size="sm" [autoFocus]="true" [(ngModel)]="userName" [dValidateRules]="[{required:true}]"
      (searchFn)="getRepoList($event)">
    </d-search>
  </d-form-item>
  <d-form-item>
    <d-time-axis mode="alternative" [data]="repoAxisTemplate" [contentTemplate]="repoTemplate"></d-time-axis>
  </d-form-item>
</form>
<ng-template #repoTemplate let-data="data">
  <div style="position:relative">
    <div *ngIf="data.position==='bottom'"
      style="margin-bottom: 4px; position: relative; left: 4px; width: 2px; height: 40px; background-color: #dfe1e6">
    </div>
    <div [style.border-color]="data.color"
      style="border-left: 4px solid; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1); padding: 12px 8px"
      [style.background-color]="data.backgroundColor">
      <div style="padding-bottom: 8px; font-size: 14px; font-weight: bold">{{ data.name }}</div>
      <div style="padding-bottom: 8px; font-size: 14px; font-weight: bold">{{ data.description }}</div>
      <div style="padding-bottom: 8px">创建日期：{{ data.created_at }}</div>
      <div style="padding-bottom: 8px">修改日期：{{ data.updated_at }}</div>
      <div style="padding-bottom: 8px">状态：<d-tag [tag]="data.status" [customColor]="data.color"></d-tag>
      </div>
    </div>
    <div *ngIf="data.position==='top'"
      style="margin-top: 4px; position: relative; left: 4px; width: 2px; height: 40px; background-color: #dfe1e6"></div>
  </div>
</ng-template>
